package com.dyw.mail.Controller;

import com.dyw.mail.service.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Devil
 * @create 2022-02-21 14:48
 */
@RestController
@RequestMapping("mail")
public class MailController {
    @Autowired
    private MailService mailService;

    @GetMapping
    public void SendMail(){
        String to = "1639579565@qq.com";
        String subject = "你好 彭芳姐";
        String content = "你好 彭芳姐 很抱歉 你要上体育课 但是我们还没有通知 只能再实验室学习 祝你好运";
        mailService.sendSimpleTextMail(to,subject,content);
    }

}
